package com.example.soapserver.service;

import com.example.soapserver.model.department.*;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlElement;

/**
 * 部门WebService服务接口
 */
@WebService(name = "DepartmentService", 
           targetNamespace = "http://com.cssc.cn/webservice/department")
public interface DepartmentWebService {
    
    /**
     * 接收部门数据
     */
    @WebMethod(operationName = "receiveDeptData")
    @WebResult(name = "receiveDeptDataResponse")
    ReceiveDeptDataResponse receiveDeptData(
        @WebParam(name = "receiveDeptDataRequest") 
        @XmlElement(required = true)
        ReceiveDeptDataRequest request
    );
    
    /**
     * 根据部门编码获取部门信息
     */
    @WebMethod(operationName = "getDeptByCode")
    @WebResult(name = "getDeptByCodeResponse")
    GetDeptByCodeResponse getDeptByCode(
        @WebParam(name = "getDeptByCodeRequest") 
        @XmlElement(required = true)
        GetDeptByCodeRequest request
    );
    
    /**
     * 获取所有部门信息
     */
    @WebMethod(operationName = "getAllDepts")
    @WebResult(name = "getAllDeptsResponse")
    GetAllDeptsResponse getAllDepts(
        @WebParam(name = "getAllDeptsRequest") 
        GetAllDeptsRequest request
    );
    
    /**
     * 测试服务连通性
     */
    @WebMethod(operationName = "testService")
    @WebResult(name = "testServiceResponse")
    String testService();
}